<?php
require('update.php');
function get_bduss ($cookie) {
	global $base;
	if (strpos($cookie,'BDUSS=')===FALSE) $base->DisplayError('找不到BDUSS');
	if (preg_match('/BDUSS=(.*?);/',$cookie,$matches)) {
		$BDUSS=trim($matches[1]);
	} elseif (preg_match('/BDUSS=(.*?)$/',$cookie,$matches)) {
		$BDUSS=trim($matches[1]);
	} else {
		$base->DisplayError('找不到BDUSS');
	}
	return $BDUSS;
}
$base->db('set','delkeyword',array('减肥'));
$base->db('set','deltieba',array('firefox'));
$bduss=get_bduss($base->getval('cookie'));
$base->setval('cookie',NULL);
$base->setval('BDUSS',$bduss);
$base->ShowTips('升级成功，请及时删除本文件','success');
?>